home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / Hack / MISC / VAXINS.ZIP / VAXINS.TXT
Encoding:
Text File  |  1991-02-01  |  6.3 KB  |  159 lines

  1.  
  2.  
  3.                 _____________________________
  4.                /                             \
  5.               |       Inside Vax/Vms         |
  6.               |   Using Command Procedures   |
  7.               |                              |
  8.               |             By               |
  9.               |        Master Blaster        |
  10.                \_____________________________/
  11.  
  12.               Advanced Telecommunications Inc.
  13.  
  14.  
  15. Note: The following is geared for the more advanvced hacker.
  16.  
  17.      Part 1: Using Command Procedures.
  18.              ----- ------- ----------
  19.      You  can  use  command procedures to automate  sequences  of 
  20. commands that you use quite often.  For example,  if you  always 
  21. se  the  DIRECTORY command after you move to  a  Sub-Directory 
  22. here  work  files  are  kept,  you can write  a  simple  command 
  23. procedure to issue the SET DEFAULT and DIRECTORY commands for you.  
  24. he following example, GO_DIR.COM, contains two commands:
  25. $ Set Default [perry.accounts]
  26.  -More?[Y/n/ns]: ns
  27. $ directory
  28. Instead of using each command alone,  you can execute  GO_DIR.COM 
  29. with the  command:
  30. $ Go_Dir
  31.  
  32. his  command tells the DCL command interpreter to read the  file 
  33. O_DIR.COM and executes the commands in the file.   So the command 
  34. nterpreter  sets  your  default  directory  to[PERRY.ACCOUNTS]  and 
  35. sues the DIRECTORY command.
  36.  
  37. ote: DCL means Digital Command Language. (sorry)
  38.  
  39.  
  40. Formatting Command Procedures 
  41. ---------- ------- ----------
  42.     Use  the  DCL command CREATE to create and format a  command 
  43. rocedure.   When you name the command procedure,  use the default 
  44. ile type COM.  If you use this default, you don't have to use the 
  45. ile type when you execute the procedure with the  command.
  46. Command  procedures  contain DCL commands that you want  the  DCL 
  47. command  intepreter  to execute and data lines that are  used  by 
  48. hese commands.  Commands must begin with a dollar sign.  You can 
  49. tart the command string just  after the dollar sign.
  50. Data lines do not start with a dollar sign.  Data lines are  used 
  51. as  input  data for commands.   Data lines are used by  the  most 
  52. ecently issued command.
  53.  
  54. he  following  examle shows command and data lines in a  command 
  55. rocedure.
  56. $ mail
  57. SEND
  58. HOMAS
  59. Y MEMO
  60. id you get my memo?
  61.  
  62.  Show users thomas
  63. The first line is a command and must start with a "$".   The next 
  64. ines  are data lines that are used by the mail  function;  these 
  65. lines must not start with "$".
  66. Using Multiple Lines for One Command
  67. ----- -------- ----- --- --- -------
  68.  
  69.     If  you are writing a command that includes many  qualifers, 
  70. ou  can make the command procedure more readable by listing  the 
  71. ualifers on seperate lines rather than running them  together.  To 
  72. o this, use the hyphen as a continuation character.  Don't start 
  73. he continued line with "$". For example:
  74. $ print test.out -
  75.           /after=18:00 -
  76.          /copies=10 -
  77.          /queue=lpb0:
  78.  
  79.  
  80. xecuting Command Procedures
  81. -------- ------- ----------
  82.     You can execute command procedures in two modes: interactive 
  83. nd  batch.   In  interactive mode,  the commands in the  command 
  84. rocedure are executing as if you were typing them.   You  cannot 
  85. xecute  any other commands from your computer.   In batch  mode, 
  86. he   system  creates  a  seprate  process  to  run  the  command 
  87. procedure.   After  you use a batch job you  can continue to  use 
  88. e system while it executes.
  89.  
  90. xecuting Command Procedures Interactively
  91. -------- ------- ---------- -------------
  92.      To  execute a command procedure interactively,  type the "" 
  93. command followed by the file specifications.   If you don't enter 
  94. e entire command specification, the system will use the current 
  95. disk, directory, and file default. 
  96. Changing Command Levels
  97. -------- ------- ------
  98.      A  command  level  is the DCL level  from  which  you  issue 
  99. commands.   When  you log in and type commands at your  Computer, 
  100. u  are issuing commands at your level zero.   If you execute  a 
  101. procedure,  the commands in the procedure are executed at command 
  102. evel  1.   When the procedure ends and the DCL prompt is on your 
  103. creen, you are back at levil zero.
  104. A System Login File
  105. - ------ ----- ----
  106.      If  a system login file exists,  it is executed  before  the 
  107. personal  file.   When  the system login file  ends,  control  is 
  108. assed to the personal login file.  System and group login files 
  109. low  a  system manager to make sure certian files are  executed 
  110. when a person logs in.
  111. To make a system login file, you have to have a managers account, 
  112. you use the name SYS$SYLOGIN to make the login file.
  113.  
  114. Personal Login Files
  115. ------- ----- -----
  116.      
  117.     After  executing a system or group login  file,  the  system 
  118. xecutes  a  personal login file.   Use a personal login file  to 
  119. execute  commands  that  you  want to  that  you  want  to  issue 
  120. verytime you login.  Name the login command procedure LOGIN.COM 
  121. d put it in the default login directory.
  122.  
  123. Defineing Parameters or Qualifers
  124. --------- ---------- -- ---------
  125.      You  can  create  a command procedure  that  specifies  only 
  126. parameters and(or)  qualifers and then use the command  procedure 
  127. thin a DCL command string.   This type of command procedure  is 
  128. useful  when there is a set of parimeters or qualifiers that  you 
  129. requently use with one or more particular commands.   To execute 
  130. he command string where you would normally use the qualifiers or 
  131. arameters.
  132. For  example:  You could create a command procedure that contains 
  133. these qualifiers.                 
  134. /DEBUG/SYMBOL_TABLE/MAP/FULL/CROSS_REFERENCE
  135.  
  136. o  use this command procedure,  execute it on the  command  line 
  137. here you would otherwise place qualifiers.   For example, if you 
  138. ame  the  command  procedure  DEFLINK.COM,  you  would  use  the 
  139. ollowing   command  line  to  link  to  an  object  module  name 
  140. YNAPSE.OBJ with the qualifiers that you specified in the  command 
  141. rocedure:
  142. $ LINK SYNAPSEDEFLINK
  143.  
  144. he  next  example shows a command procedure named PARM.COM  that 
  145. contains parameters:
  146. HAP1, CHAP2
  147. To execute the procedure, use it in a command string in place of a 
  148. parameter name: 
  149. $ DIRECTORY PARAM
  150.  
  151.  
  152.  
  153. s  the others in this set are completed,  they should stay in  a 
  154. oup.
  155.  
  156. H)ackRite 1986 - Advanced Telecommunications Inc.
  157.  
  158. DOWNLOADED FROM P-80 SYSTEMS.....
  159.